<include file="Public/head"/>
<link href="__PUBLIC__/qwadmin/css/shen/shen.css" rel="stylesheet" type="text/css" />
<style>

     tr{border: none;}
        .div1{display: flex;flex-direction: row;justify-content: center;align-items: flex-start;margin-top: 20px; margin-bottom: 20px;}
        .put1{width: 10%;height: 80%;border: none;}
        .put{border: none;width: 100%;height: 80%;text-align: center;}
        td{height: 40px;border-bottom: 0px;border-right: 0px;}
        th{height: 40px;border-bottom: 0px;border-right: 0px;font-size: 18px;}
        .td button{
            margin-left: :50%;
        }
.table input{
    width:110px;
}

</style>
<body class="no-skin">
<include file="Public/header"/>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }

    </script>


    <include file="Public/sidebar"/>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs"/>

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set"/>
                <h2 style="text-align:center;margin-top:30px;"><b>固定资产信息修改</b></h2><br>
                <form id="form" >
                <table class="table table-bordered">
                    <tr>
                        <!-- <th class="center">ID</th> -->
                        <th class="center">编号</th>
                        <th class="center">资产分类</th>
                        <th class="center">资产名称</th>
                        <th class="center">规格型号</th>
                        <th class="center">单位</th>
                        <th class="center">原始价格</th>
                        <th class="center">使用部门</th>
                        <th class="center">存放地点</th>
                        <th class="center">领用人</th>
                        <th class="center">当前使用人</th>
                        <th class="center">状态</th>
                        <th class="center">备注</th>
                        <th class="center">修改</th>

                    </tr>
                    <!-- 第一行 -->
                    <volist name="glist" id="v">
                    <tr>
                        <td style="display:none;"><input type="hidden" name="id" value="{$v['id']}"></td>
                        <td class="center"><input type="text" name="bhao" value="{$v['bhao']}"></td>
                        <td class="center"><input type="text" name="class" value="{$v['class']}"></td>
                        <td class="center"><input type="text" name="wname" value="{$v['wname']}"></td>
                        <td class="center"><input type="text" name="gui" value="{$v['gui']}"></td>
                        <td class="center"><input type="text" name="com" value="{$v['com']}"></td>
                        <td class="center"><input type="text" name="unit" value="{$v['unit']}"></td>
                        <td class="center"><input type="text" name="ment" value="{$v['unit']}"></td>
                        <td class="center"><input type="text" name="place" value="{$v['place']}"></td>
                        <td class="center"><input type="text" name="uname" value="{$v['uname']}"></td>
                        <td class="center"><input type="text" name="dname" value="{$v['dname']}"></td>
                        <td class="center"><input type="text" name="state" value="{$v['state']}"></td>
                        <td class="center"><input type="text" name="content" value="{$v['content']}"></td>
                        <td colspan="12" class="center"> <div class="xiu" style="width:100px;color:#000;" onclick="gxiu({$v.id},this)">确定修改</div> </td>                  
                    </tr>
                    </volist>
                </table>
                </form>
                <hr>

               <h2 style="text-align:center;margin-top:100px;color:#0080FF;"><b>固定资产修改记录</b></h2><br>
                <table class="table table-bordered">
                    <tr>
                        <!-- <th class="center">ID</th> -->
                        <th class="center">编号</th>
                        <th class="center">资产分类</th>
                        <th class="center">资产名称</th>
                        <th class="center">规格型号</th>
                        <th class="center">单位</th>
                        <th class="center">原始价格</th>
                        <th class="center">使用部门</th>
                        <th class="center">存放地点</th>
                        <th class="center">领用人</th>
                        <th class="center">当前使用人</th>
                        <th class="center">状态</th>
                        <th class="center">备注</th>
                        <th class="center">修改人</th>
                        <th class="center">修改时间</th>
                        <th class="center">操作</th>

                    </tr>
                    <!-- 第一行 -->
                    <volist name="gxiu" id="vo">
                    <tr>
                        <td class="center">{$vo.bhao}</td>
                        <td class="center">{$vo.class}</td>
                        <td class="center">{$vo.wname}</td>
                        <td class="center">{$vo.gui}</td>
                        <td class="center">{$vo.com}</td>
                        <td class="center">{$vo.unit}</td>
                        <td class="center">{$vo.ment}</td>
                        <td class="center">{$vo.place}</td>
                        <td class="center">{$vo.uname}</td>
                        <td class="center">{$vo.dname}</td>
                        <td class="center">{$vo.state}</td>
                        <td class="center">{$vo.content}</td>
                        <td class="center">{$vo.xname}</td>
                        <td class="center">{$vo.time}</td>
                        <td colspan="12" class="center"> <button class="jujue"  onclick="del({$vo.id},this)">删除</button> </td>                  
                    </tr>
                    </volist>
                </table>
               
                   <!--  <div class="table-responsive">
                      <table class="table">
                         
                      </table>
                    </div> -->
                
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <include file="Public/footer"/>

</div><!-- /.main-container -->

<include file="Public/footerjs"/>
<script src="__PUBLIC__/layer/layer.js"></script>
<script src="__PUBLIC__/jquery-1.7.2.min.js"></script>
<script src="__PUBLIC__/js/jHsDate.js"></script>
<!-- inline scripts related to this page -->
<script type="text/javascript">

function gxiu()
{
          //询问框
    layer.confirm('确定修改么 ( ・◇・)？', {
      btn: ['确定','取消'] //按钮
    }, function(){
         $.ajax({
             type: "POST",
             url:"{:U('Gu/gxiuo')}",
             data:$('#form').serialize(),// 要提交的表单 
             beforeSend:function(){
                   layer.load(0, {shade: false});
                },
             success: function(msg) {
                if (msg == 1111) {
                    layer.msg('修改成功!ヾ(o◕∀◕)ﾉ 好棒~', {icon: 1});
                    history.go(0); 
                }else{
                    layer.msg('修改失败!', {icon: 2});
                }
             },
             complete: function() {
                     layer.closeAll('loading');
                }
         });
     
    }, function(){
        layer.msg(' (｡・`ω´･) 再见');
    });   
}


   function del(id,obj)
   {
    // console.log(id);
    var type = 2;
    $.ajax({
            type: "POST",
            url:"{:U('Gu/del')}",
            data:{'id':id,'type':type},// 要提交的表单 
            beforeSend:function(){
                layer.load(0, {shade: false});
            },
            success: function(data) {
                if (data == 1111) {
                        layer.msg('删除成功!', {icon: 1});
                       
                        history.go(0); 
                    }else{
                        layer.msg('删除失败!', {icon: 2});
                    }
            },
            complete: function() {
                layer.closeAll('loading');
            }
        });
   }




</script>
</body>
</html>
